<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Feedback Details</f:facet>

        <s:decorate id="feedbackid" template="layout/display.xhtml">
            <ui:define name="label">Feedbackid</ui:define>
            <h:outputText value="#{feedbackHome.instance.feedbackid}">
                <f:convertNumber/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="text" template="layout/display.xhtml">
            <ui:define name="label">Text</ui:define>
            <h:outputText value="#{feedbackHome.instance.text}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/FeedbackEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty feedbackFrom ? 'FeedbackList' : feedbackFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Job</h:panelGroup>
        </f:facet>
    <div class="association" id="jobParent">

        <h:outputText value="There is no job associated with this feedback."
                   rendered="#{feedbackHome.instance.job == null}"/>

        <rich:dataTable var="_job"
                   value="#{feedbackHome.instance.job}"
                rendered="#{feedbackHome.instance.job != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="jobTable">
            <h:column>
                <f:facet name="header">Jobname</f:facet>
                <h:outputText value="#{_job.jobname}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewjob"
                     value="View"
                      view="/Job.xhtml">
                    <f:param name="jobJobname"
                           value="#{_job.jobname}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Timeentry</h:panelGroup>
        </f:facet>
    <div class="association" id="timeentryParent">

        <h:outputText value="There is no timeentry associated with this feedback."
                   rendered="#{feedbackHome.instance.timeentry == null}"/>

        <rich:dataTable var="_timeentry"
                   value="#{feedbackHome.instance.timeentry}"
                rendered="#{feedbackHome.instance.timeentry != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="timeentryTable">
            <h:column>
                <f:facet name="header">Timeentryid</f:facet>
                <h:outputText value="#{_timeentry.timeentryid}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Job jobname</f:facet>
                <h:outputText value="#{_timeentry.job.jobname}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Person personid</f:facet>
                <h:outputText value="#{_timeentry.person.personid}">
                    <f:convertNumber/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Startdatetime</f:facet>
                <h:outputText value="#{_timeentry.startdatetime}">
                    <s:convertDateTime type="date" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Enddatetime</f:facet>
                <h:outputText value="#{_timeentry.enddatetime}">
                    <s:convertDateTime type="date" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewtimeentry"
                     value="View"
                      view="/Timeentry.xhtml">
                    <f:param name="timeentryTimeentryid"
                           value="#{_timeentry.timeentryid}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
